//
// CTransformShape.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.CVector;

public class CTransformShape extends CTransform {
  private long swigCPtr;

  public CTransformShape(long cPtr, boolean cMemoryOwn) {
    super(nel3dJNI.CTransformShape_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(CTransformShape obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        throw new UnsupportedOperationException("C++ destructor does not have public access");
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public static void registerBasic() {
    nel3dJNI.CTransformShape_registerBasic();
  }

  public void setShape(SWIGTYPE_p_CSmartPtrT_NL3D__IShape_t value) {
    nel3dJNI.CTransformShape_Shape_set(swigCPtr, this, SWIGTYPE_p_CSmartPtrT_NL3D__IShape_t.getCPtr(value));
  }

  public SWIGTYPE_p_CSmartPtrT_NL3D__IShape_t getShape() {
    long cPtr = nel3dJNI.CTransformShape_Shape_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_CSmartPtrT_NL3D__IShape_t(cPtr, false);
  }

  public void getAABBox(SWIGTYPE_p_NLMISC__CAABBox bbox) {
    nel3dJNI.CTransformShape_getAABBox(swigCPtr, this, SWIGTYPE_p_NLMISC__CAABBox.getCPtr(bbox));
  }

  public long getNumMaterial() {
    return nel3dJNI.CTransformShape_getNumMaterial(swigCPtr, this);
  }

  public CMaterial getMaterial(long materialId) {
    long cPtr = nel3dJNI.CTransformShape_getMaterial__SWIG_0(swigCPtr, this, materialId);
    return (cPtr == 0) ? null : new CMaterial(cPtr, false);
  }

  public float getNumTriangles(float distance) {
    return nel3dJNI.CTransformShape_getNumTriangles(swigCPtr, this, distance);
  }

  public float getNumTrianglesAfterLoadBalancing() {
    return nel3dJNI.CTransformShape_getNumTrianglesAfterLoadBalancing(swigCPtr, this);
  }

  public CMRMLevelDetail getMRMLevelDetail() {
    long cPtr = nel3dJNI.CTransformShape_getMRMLevelDetail(swigCPtr, this);
    return (cPtr == 0) ? null : new CMRMLevelDetail(cPtr, false);
  }

  public void changeLightSetup(CRenderTrav rdrTrav) {
    nel3dJNI.CTransformShape_changeLightSetup(swigCPtr, this, CRenderTrav.getCPtr(rdrTrav), rdrTrav);
  }

  public boolean canStartStop() {
    return nel3dJNI.CTransformShape_canStartStop(swigCPtr, this);
  }

  public void start() {
    nel3dJNI.CTransformShape_start(swigCPtr, this);
  }

  public void stop() {
    nel3dJNI.CTransformShape_stop(swigCPtr, this);
  }

  public boolean isStarted() {
    return nel3dJNI.CTransformShape_isStarted(swigCPtr, this);
  }

  public float getDistMax() {
    return nel3dJNI.CTransformShape_getDistMax(swigCPtr, this);
  }

  public void setDistMax(float distMax) {
    nel3dJNI.CTransformShape_setDistMax(swigCPtr, this, distMax);
  }

  public boolean isLinkToQuadCluster() {
    return nel3dJNI.CTransformShape_isLinkToQuadCluster(swigCPtr, this);
  }

  public boolean clip() {
    return nel3dJNI.CTransformShape_clip(swigCPtr, this);
  }

  public void traverseLoadBalancing() {
    nel3dJNI.CTransformShape_traverseLoadBalancing(swigCPtr, this);
  }

  public void traverseRender() {
    nel3dJNI.CTransformShape_traverseRender(swigCPtr, this);
  }

  public void profileRender() {
    nel3dJNI.CTransformShape_profileRender(swigCPtr, this);
  }

  public void getLightHotSpotInWorld(CVector modelPos, SWIGTYPE_p_float modelRadius) {
    nel3dJNI.CTransformShape_getLightHotSpotInWorld(swigCPtr, this, CVector.getCPtr(modelPos), modelPos, SWIGTYPE_p_float.getCPtr(modelRadius));
  }

  public CLightContribution getLightContribution() {
    return new CLightContribution(nel3dJNI.CTransformShape_getLightContribution(swigCPtr, this), false);
  }

}
